const path = require('path');

const ext = path.extname('E:/HBuilderProjects/nodejs/01初始nodejs与内置模块/files/成绩.txt');
console.log(ext); //返回 .txt
